#!/usr/bin/env python
#coding:utf-8
print("###########打印列表中的最大,最小值###############")
ll=[]
def PrintMax(the_list):
    for i in the_list:
	if isinstance(i,list):
	    PrintMax(i)
	else:
	    ll.append(i)
    for item in range(len(ll)-1):
	if ll[item] > ll[item+1]:
	    tmp = ll[item]
	    ll[item] = ll[item+1]
	    ll[item+1] = tmp
    return ll[0],ll[len(ll)-1]
	
	
if __name__ == '__main__':
    li=[3,19,[33,[4,1,223],[313131,131],21,222],11,2,34,2,89,21,12,1,5,100,99,62,26,191,102,21]
    min,max=PrintMax(li)
    print(max)
    print(min)
